//
//  LHSpecHeaderCell.m
//  lehuotest
//
//  Created by ice on 2017/1/5.
//  Copyright © 2017年 QF. All rights reserved.
//
@class LHSpecHeaderCell;
#import "LHSpecHeaderCell.h"

@interface LHSpecHeaderCell()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation LHSpecHeaderCell

-(UILabel *)titleLabel
{
    if (!_titleLabel){
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = [UIColor blackColor];
        _titleLabel.font = [UIFont systemFontOfSize:14];
        _titleLabel.text = @"颜色";
        _titleLabel.frame = CGRectMake(10, 0, 200, [LHSpecHeaderCell CellDefaultHeight]);
    }
    return _titleLabel;
}
+(instancetype) initWithTableView:(UITableView *)tableView
{
    static NSString *LHSpecHeaderCellIdentifier = @"LHSpecHeaderCellIdentifier";
    LHSpecHeaderCell *cell = [tableView dequeueReusableCellWithIdentifier:LHSpecHeaderCellIdentifier];
    if (cell == nil){
        cell = [[LHSpecHeaderCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LHSpecHeaderCellIdentifier];
    }

    return cell;
}
-(id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}
-(void) layoutSubviews
{
    [super layoutSubviews];
    
}

+(CGFloat) CellDefaultHeight
{
    return 30;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
